package org.lds.scheduled.job.admin.client.core.model.response;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class RegisterJobResponse {
    private Long appId;
    private Long appInstanceId;
    private List<Job> jobs;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class Job {
        /**
         * 任务ID
         */
        private Long id;

        /**
         * 任务名称
         */
        private String name;

        /**
         * 触发规则类型
         * 1: 固定频率（秒）
         * 2: CRON
         */
        private Integer triggerRuleType;

        /**
         * 触发规则内容
         */
        private String triggerRuleContent;
    }
}
